//
//  WXLiveBeautyToolView.m
//  66TV
//
//  Created by ben on 2016/12/8.
//  Copyright © 2016年 shifeng. All rights reserved.
//

#import "WXLiveBeautyToolView.h"
#import "Masonry.h"
#import "WTCategories.h"
@interface WXLiveBeautyToolView ()

@end

@implementation WXLiveBeautyToolView

- (void)layoutSubviews{
    [super layoutSubviews];
    UIBezierPath *rounded = [UIBezierPath bezierPathWithRoundedRect:self.bounds
                                                  byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomLeft
                                                        cornerRadii:CGSizeMake(15.0, 15.0)];
    CAShapeLayer *shape = [[CAShapeLayer alloc] init];
    [shape setPath:rounded.CGPath];
    self.layer.mask = shape;

}

- (void)awakeFromNib{
    [super awakeFromNib];
    [self.beautyButton setImage:[UIImage wt_imageWithName:@"wt_play_beauty_icon"] forState:UIControlStateNormal];
}

- (void)setIsZhanKai:(BOOL)isZhanKai{
    
    _isZhanKai = isZhanKai;
    if(isZhanKai){
        [self.backButton setImage:[UIImage wt_imageWithName:@"wt_play_right_pull_icon"] forState:UIControlStateNormal];
    }else {
        [self.backButton setImage:[UIImage wt_imageWithName:@"wt_play_right_push_icon"] forState:UIControlStateNormal];
    }
    
    [self mas_updateConstraints:^(MASConstraintMaker *make) {
        if(self.isZhanKai){
            make.trailing.mas_equalTo(0);
        }else {
            make.trailing.mas_equalTo(35);
        }
    }];
}
- (IBAction)buttonPressed:(id)sender {
}
@end
